<template>
	<view>
		<CustomNavBar @networkChanged="loadD"></CustomNavBar>
		<CustomTabBar :currentPage="currentPage"></CustomTabBar>
		<!-- 内容 -->
		<view class="content">
			<view class="user">
				<image class="user-img" src="/static/xiaotu/lan.png"></image>
				<view>
					<view class="user-assets">{{$t('My.characters1')}}</view>
					<view style="margin-left: 20rpx;font-size: 16px;color: #5c5c5c;">{{nowSubAccount}}</view>
				</view>
			</view>
			
			<!-- 资产信息 -->
			<view class="commission-container">
			    <!-- 两列三行布局 -->
			    <view class="commission-grid">
			      <!-- 第一行 -->
			      <view class="commission-item">
			        <view class="title">{{$t('My.characters2')}}</view>
			        <view class="value">{{assetsData.total_reward_lockup}} {{cointype}}</view>
			      </view>
			      <view class="commission-item">
			        <view class="title">{{$t('My.characters3')}}</view>
			        <view class="value">{{assetsData.today_reward_lockup}} {{cointype}}</view>
			      </view>
			
			      <!-- 第二行 -->
			      <view class="commission-item">
			        <view class="title">{{$t('My.characters4')}}</view>
			        <view class="value">{{assetsData.platform_usdt}} {{cointype}}</view>
			      </view>
			      <view class="commission-item">
			        <view class="title">{{$t('My.characters5')}}</view>
			        <view class="value">{{assetsData.pool_balance}} {{cointype}}</view>
			      </view>
			
			      <!-- 第三行 -->
			      <view class="commission-item">
			        <view class="title">{{$t('My.characters6')}}</view>
			        <view class="value">{{assetsData.lockup_balance}} {{cointype}}</view>
			      </view>
			      <view class="commission-item">
			        <view class="title">{{$t('My.characters13')}}</view>
			        <view class="value">{{assetsData.withdraw_usdt}} {{cointype}}</view>
			      </view>
			    </view>
			  </view>
			  <!-- 提领框 -->
			  <view class="withdraw-container">
			    <!-- 标题 -->
			    <view class="withdraw-title">{{$t('My.characters7')}}</view>
			    
			    <!-- 输入框区域 -->
			    <view class="input-box">
			      <input 
			        class="amount-input" 
			        type="number" 
			        placeholder="0" 
					v-model="withdrawAmount"
			        placeholder-style="color: #4f4f4f;"
			      />
			      <view class="input-right">
			        <view class="max-btn">
			          <text class="max-text">MAX</text>
			        </view>
			        <view class="divider"></view>
			        <image 
			          src="/static/xiaotu/qian.png" 
			          class="token-icon"
			          mode="aspectFit"
			        />
			        <text class="token-name">{{currencyType}}</text>
			      </view>
			    </view>
			    
			    <!-- 总余额 -->
			    <view class="balance">{{$t('My.characters8')}} : {{assetsData.platform_usdt}} {{currencyType}}</view>
			    
			    <!-- 提现地址 -->
			    <view class="address-title">{{$t('My.characters9')}} : {{nowSubAccount}}</view>
			    
			    <!-- 确认按钮 -->
			    <view class="confirm-btn" :class="isbalance()?'confirm-btn-after':''" @click="toWithdrawal">{{$t('My.characters10')}}</view>
			  </view>
			  <!-- 底部跳转-->
			  <view class="record-container">
			    <!-- 收益记录 -->
			    <view class="record-item" @click="Income">
			      <text class="record-text">{{$t('My.characters11')}}</text>
			      <uni-icons type="arrowright" size="18" color="#999"></uni-icons>
			    </view>
			    
			    <!-- 提现记录 -->
			    <view class="record-item" @click="CashWithdrawal">
			      <text class="record-text">{{$t('My.characters12')}}</text>
			      <uni-icons type="arrowright" size="18" color="#999"></uni-icons>
			    </view>
			  </view>
			  
		</view>
		
	</view>
</template>

<script src="./index.js"></script>
<style src="./index.scss" lang="scss"></style>